home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1997 / MacHack 1997.toast / Hacks / Hacks ’96 / Internet Chooser / reggie / basic / store.h < prev   
Text File  |  1996-06-22  |  2KB  |  57 lines

  1. /* File "store.h", AvaraTracker - Copyright (C) Matt Slot, 1996 */
  2.  
  3. #ifndef __STORE_HEADER__
  4. #define __STORE_HEADER__
  5.  
  6. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  7. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  8. /* Include Files */
  9.  
  10. #include "stdtypes.h"
  11.  
  12. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  13. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  14. /* Preprocessor Defines */
  15.  
  16.  
  17. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  18. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  19. /* Structure/Class Declarations */
  20.  
  21. typedef class c_store {
  22.  
  23. public:
  24.  
  25.                         c_store            (UInt32 elem_size);
  26.                         ~c_store        (void);
  27.     
  28.     /* Administrative functions */
  29.             SInt32        insert_elem        (Byte8 *new_data, UInt32 before_elem=0);
  30.             SInt32        append_elem        (Byte8 *new_data)
  31.                             { return(insert_elem(new_data, count)); }
  32.             SInt32        remove_elem        (UInt32 index);
  33.             SInt32        remove_all        (void);
  34.  
  35.             UInt32        count_elems        (void) { return(count); }
  36.             Byte8 *        get_nth_elem        (UInt32 index);
  37.             
  38. private:
  39.  
  40.             UInt32        size;    /* Element Size */
  41.             UInt32        count;    /* Element Count */
  42.             Byte8 *        data_ptr;
  43.  
  44.     } c_store;
  45.  
  46. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  47. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  48. /* Function Prototypes */
  49.  
  50.         
  51. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  52. /* **** **** **** **** **** **** **** **** **** **** **** **** **** **** **** */
  53.  
  54. #endif /* __STORE_HEADER__ */
  55.  
  56.  
  57.